package org.mathig.poker;

import java.util.List;

/**
 * Table of poker.<br>
 * Contains all information about a session of poker.
 * 
 * @author mathig
 */
public interface Context {

	/**
	 * Returns remaining players the current hand.<br>
	 * Fold and eliminated players are excluded.
	 * 
	 * @return player count
	 */
	List<Player> getPlayers();

	/**
	 * Returns the amount of all-in of a player.
	 * 
	 * @param player
	 * @return amount of its all-in
	 */
	int getStack(Player player);

	/**
	 * Forced contributions by all players.
	 * 
	 * @return amount of ante (may be 0 almost at begining)
	 */
	int getAnte();

	/**
	 * Returns the Small Blind (SB).
	 * 
	 * @return amount of SB
	 */
	int getSmallBlind();

	/**
	 * Returns the Big Blind (BB).
	 * 
	 * @return amount of BB
	 */
	int getBigBlind();

	/**
	 * Returns cards of the board.<br>
	 * <ul>
	 * <li>pre-flop : none
	 * <li>flop : 3 cards
	 * <li>turn : 4 cards
	 * <li>river : 5 cards
	 * </ul>
	 * 
	 * @return board cards
	 */
	List<Card> getBoard();

	/**
	 * Returns the current pot.
	 * 
	 * @return amount of the pot
	 */
	int getPot();

	/**
	 * Returns the current pot with bets of current turn.
	 * 
	 * @return amount of the pot
	 */
	int getPotWithBets();

	/**
	 * Returns the current (highest) bet.<br>
	 * This is the default bet that a player should pay to continue the hand, otherwise he has to fold.
	 * 
	 * @return
	 */
	int getBet();

	/**
	 * Returns the bet of a particular player.
	 * 
	 * @param player
	 * @return amount of its bet
	 */
	int getBet(Player player);

}
